<template>
	<view class="home-index">
		<view class="head-title">超值购</view>
		<!-- 返回按钮 -->
		<u-back-top :scroll-top="scrollTop" top="10" :duration="240" :iconStyle="iconStyle" :customStyle="custom">
		</u-back-top>
		<searchButton :searchStatus="searchStatus"></searchButton>
		<view class="home-content">
			<view class="button-group">
				<block v-for="(res, index) in buttonGroupList" :key="index">
					<view class="button" @click="navigateToMall(index)">
						<image class="button-img" :src="res.imgUrl" mode="widthFix"></image>
						<view class="button-text">{{ res.title }}</view>
					</view>
				</block>
			</view>
			<!-- 轮播图 -->
			<topSwiper :list="list"></topSwiper>
			<!-- <view class="action"> -->
			<!-- <view class="action-title">活动专场</view>
				<view class="action-content"> -->
			<!-- 新版 -->
			<!-- <view class="action-item"> -->
			<!-- <view class="button"> -->
			<!-- <image class="button-images" src="@/static/images/home/left.png" mode="widthFix" @click="navigateTo(0)"></image> -->
			<!-- </view> -->
			<!-- <view class="button"> -->
			<!-- <image class="button-images" src="@/static/images/home/right.png" mode="widthFix" @click="navigateTo(1)"></image> -->
			<!-- </view> -->
			<!-- </view> -->
			<!-- 旧版 -->
			<!-- <view class="action-item" v-for="(res, index) in actionGoodsList" :key="index">
						<image class="goods-img" :src="res.imgUrl" mode="widthFix"></image>
						<view class="goods-content" v-if="res.status == 0" @click="navigateTo(0)">
							<view class="top">
								<view class="goods-title">{{ res.title }}</view>
								<view class="goods-tag-one">限量{{ res.limit }}份</view>
							</view>
							<view class="price-button">
								<view class="left">
									<view class="goods-join">{{ res.join }}人已参加</view>
									<view class="goods-price-one">
										￥<text style="font-family: Number;">{{ res.price }}</text>
									</view>
								</view>
								<view class="right-button-one">立即参与</view>
							</view>
						</view>
						<view class="goods-content" v-else @click="navigateTo(1)">
							<view class="top">
								<view class="goods-title">{{ res.title }}</view>
								<view class="goods-tag-two">限量{{ res.limit }}份</view>
							</view>
							<view class="price-button">
								<view class="left">
									<view class="goods-join">{{ res.join }}人已参加</view>
									<view class="goods-price-two">￥ <text
											style="font-family: Number;">{{ res.price }}</text></view>
								</view>
								<view class="right-button-two">立即参与</view>
							</view>
						</view>
					</view> -->
			<!-- </view> -->
			<!-- </view> -->
			<view class="new-arrival">
				<view class="arrival-title-item">
					<view class="arrival-title">今日上新</view>
					<view class="arrival-title-right">查看更多 ></view>
				</view>
				<view class="arrival-content">
					<scroll-view class="scroll-item" scroll-x="true" @scroll="scroll">
						<view class="arrive-item" v-for="(res, index) in arrivalGoodsList" :key="index"
							@click="navigateFinal">
							<image class="goods-img" :src="res.imgUrl" mode="widthFix"></image>
							<view class="goods-content">
								<view class="title">{{res.title}}</view>
								<view class="price">
									￥<text
										style="font-family: Number;font-size: 19px;font-weight: bold;">{{res.price}}</text>
								</view>
							</view>
						</view>
					</scroll-view>
				</view>
			</view>
			<view class="recommend">
				<view class="recommend-title">为您推荐</view>
				<view class="recommend-content">
					<template v-if="itemList.length != 0">
						<block v-for="(res, index) in recommendGoodsList" :key="index">
							<view class="recommend-item" @click="navigateMall">
								<view class="item-style">
									<view class="item-img-style">
										<image class="item-img" :src="res.imgUrl" mode="widthFix"></image>
									</view>
									<view class="item-info">
										<view class="item-name">{{ res.title }}</view>
										<view class="item-status">
											<view class="price">
												￥
												<text style="font-family: Number;font-size: 38rpx; font-weight: bold;">{{res.price}}</text>
												<text style="font-family: Number;font-size: 25rpx;opacity: 0.4;position: absolute;margin-top:3.5%;margin-left:2%;color:#404040;">￥{{orginNumber}}
												<hr style="position: relative; width: 80%; top:-8px; right:-10%;">
												</text>
											</view>
										</view>
									</view>
									<!-- <view class="item-info-two">
										<block v-if="res.status === 1 && res.number != 0">
											<view class="status">{{ res.statusName }}</view>
										</block>
										<block v-else>
											<view class="status-one">{{ res.statusName }}</view>
										</block>
									</view> -->
								</view>
							</view>
						</block>
						<!-- <u-loadmore v-if="itemList.length != 0" :status="loading.status"
							:loading-text="loading.loadingText" :loadmore-text="loading.loadmoreText"
							:nomore-text="loading.nomoreText" :icon="true" loadingIcon="circle" :line="true"
							marginTop="30" iconColor="#cecece" color="#cecece" @loadmore="lower" /> -->
					</template>
				</view>
			</view>
		</view>
		<!-- <view class="auction-content-two">
			<view class="auction-item" @click="navigateAuction">
				<view class="left">
					<image class="img" src="/static/images/home/auction.png"></image>
					<view class="content-text">
						<view class="time-count-style">
							<view class="time-title">开心竞购</view>
						</view>
					</view>
				</view>
				<view class="right">
					<image class="in" src="/static/images/common/in.png"></image>
				</view>
			</view>
			<view class="auction-item" @click="navigateMall">
				<view class="left">
					<image class="img" src="/static/images/home/mall.png"></image>
					<view class="content-text">
						<view class="time-count-style">
							<view class="time-title">销售商城</view>
						</view>
					</view>
				</view>
				<view class="right">
					<image class="in" src="/static/images/common/in.png"></image>
				</view>
			</view>
			<view class="auction-item" @click="navigateCredit">
				<view class="left">
					<image class="img" src="/static/images/home/credit.png"></image>
					<view class="content-text">
						<view class="time-count-style">
							<view class="time-title">提货券商城</view>
						</view>
					</view>
				</view>
				<view class="right">
					<image class="in" src="/static/images/common/in.png"></image>
				</view>
			</view>
			<view class="auction-item" @click="navigateFinal">
				<view class="left">
					<image class="img" src="/static/images/home/final.png"></image>
					<view class="content-text">
						<view class="time-count-style">
							<view class="time-title">代理商</view>
						</view>
					</view>
				</view>
				<view class="right">
					<image class="in" src="/static/images/common/in.png"></image>
				</view>
			</view>
			<view class="auction-item" @click="navigateIntegralMall">
				<view class="left">
					<image class="img" src="/static/images/home/integral.png"></image>
					<view class="content-text">
						<view class="time-count-style">
							<view class="time-title">积分商城</view>
						</view>
					</view>
				</view>
				<view class="right">
					<image class="in" src="/static/images/common/in.png"></image>
				</view>
			</view>
		</view> -->
	</view>
</template>

<script>
	import Fn from '@/common/public.js';
	import {
		banner,
		goodsSpecial,
		createOrder,
		GETuserinfo,
		agent_goodsList,
		GiftBag_goodsList
	} from '@/common/api.js';
	import searchButton from "@/components/SearchButton.vue" // 导入搜索框组件
	import topSwiper from "@/components/TopSwiper.vue" // 导入轮播图组件
	export default {
		components: {
			searchButton,
			topSwiper
		},
		data() {
			return {
				orginNumber:"988.00",
				/* 搜索框组件 */
				searchStatus: 0, // 搜索框组件类型

				/* 轮播图 */
				list: [
					// '/static/images/home/induceimg.png',
				], // 轮播图

				/* 按钮 */
				buttonGroupList: [{
						imgUrl: '/static/images/home/love.png',
						title: '邀请好友',
					},
					{
						imgUrl: '/static/images/home/ling.png',
						title: '系统公告',
					},
					{
						imgUrl: '/static/images/home/talk.png',
						title: '咨询客服',
					},
					{
						imgUrl: '/static/images/home/nock.png',
						title: '商品订单',
					},
				],
				// {
				// 	imgUrl: '/static/images/home/three.png',
				// 	title: '商学院'
				// }, ], // 按钮组对象

				/* 活动专场 */
				actionGoodsList: [
					// 	{
					// 	imgUrl: '/static/images/home/auction_one.png',
					// 	title: '体验区',
					// 	limit: '1000',
					// 	join: '300',
					// 	price: '20.00',
					// 	status: 0
					// }, {
					// 	imgUrl: '/static/images/home/auction_two.png',
					// 	title: '抢购区',
					// 	limit: '500',
					// 	join: '100',
					// 	price: '10.00',
					// 	status: 1
					// },
				], // 活动专场商品信息

				/* 今日上新 */
				arrivalGoodsList: [
					/*{ 	imgUrl: '/static/images/home/shoe.png',
						title: '百搭帆布鞋',
						price: '688.00'
					},
					{
						imgUrl: '/static/images/home/huaban.png',
						title: '滑板搭配装',
						price: '688.00'
					},
					{
						imgUrl: '/static/images/home/smallpeople.png',
						title: '盲盒套组',
						price: '688.00'
					}, */
				], // 今日上新商品信息
				scrollLeft: 0,
				old: {
					scrollTop: 0
				},

				/* 推荐 */
				recommendGoodsList: [{
					imgUrl: '/static/images/home/people.png',
					title: '百搭帆布鞋',
					price: '688.00'
				}, {
					imgUrl: '/static/images/home/cat.png',
					title: '百搭帆布鞋',
					price: '688.00'
				}, {
					imgUrl: '/static/images/home/dog.png',
					title: '百搭帆布鞋',
					price: '688.00'
				}, {
					imgUrl: '/static/images/home/fire.png',
					title: '百搭帆布鞋',
					price: '688.00'
				}, {
					imgUrl: '/static/images/home/twopeople.png',
					title: '百搭帆布鞋',
					price: '688.00'
				}, {
					imgUrl: '/static/images/home/wicepeople.png',
					title: '百搭帆布鞋',
					price: '688.00'
				}, ], // 推荐商品信息

				/* 返回顶部按钮 */
				scrollTop: 0, // 返回顶部滚动值
				iconStyle: {
					fontSize: '40rpx',
					fontWeight: '600',
					color: '#FFFFFF'
				}, // 滚动内层样式
				custom: {
					background: '#CB8F58'
				}, // 滚动外层样式

				/* 加载更多 */
				loading: {
					status: 'loadmore', // 加载更多设置
					loadingText: '加载中',
					loadmoreText: '轻轻上拉加载更多',
					nomoreText: '暂时没有了',
				}, // 加载设置

				/* 数据列表 */
				pages: 1, // 订单页数
				total_page: '', // 订单总页数
				amount: 5, // 订单条数
				total_amount: '', // 订单总数
				activityID: 13, // 活动场次编号
				date: '', // 活动时间
				number: '999+', // 商品销量
				itemList: [], // 商品信息

				/* 弹窗 */
				maskTips: '', // 弹窗提示
				showTips: false, // 弹窗状态

				/* 获取地理位置信息 */
				province: '1',
				city: '1',
				location: '',
				isgetlocal: false,

				/* 用户个人信息 */
				user: {
					name: '暂未登录', // 姓名
					phone: '~', // 手机号
					levelName: '', // 会员级别
					partnerName: '', // 合伙人级别
					buyOrder: '0', // 买单
					sellOrder: '0', // 卖单
					advertisingNumber: '0', // 绿色积分
					balance: '0', // 钱包抢购分
					userId: '000000', // 用户ID
				}, // 用户信息
			};
		},
		onLoad() {
			this.getBanner(); // 获取轮播图内容
			//这里可以适当延时执行
			// this.getAppInfo(0); //获取线上APP版本信息  参数type 0自动检查  1手动检查（手动检查时，之前取消更新的版本也会提示出来）
			// #ifdef H5
			// uni.getLocation({
			// 	type: 'wgs84',
			// 	altitude: true,
			// 	geocode: true,
			// 	isHighAccuracy: true,
			// 	// 本来以为是获取不到以为getLocation失效了，后来才发现原来是慢。所以一定要配置这个。
			// 	highAccuracyExpireTime: 100, // 需要设置highAccuracyExpireTime，在规定时间内返回当前最高精度的经纬度
			// 	success: function(res) {
			// 		console.log("获取位置成功", res);
			// 	},
			// 	fail: (res) => {
			// 		console.log("获取位置失败", res);
			// 	}
			// });
			// 获取地理位置
			// this.getLocationInfo();
			// #endif
		},
		onShow() {
			// this.loading.status = 'loadmore'; // 恢复加载状态
			// this.getUser(); // 获取用户信息
			this.getGoodsList();
		},
		/* 加载更多 */
		onReachBottom() {
			this.lower();
		},
		/* 返回顶部 */
		onPageScroll(e) {
			this.scrollTop = e.scrollTop;
		},
		methods: {

			/* 获取用户信息 */
			getUser() {
				const user_info = uni.getStorageSync('user_info');
				if (user_info) {
					const userInfo = JSON.parse(user_info);
					this.user.phone = userInfo.userPhone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2'); // 隐藏3-6的数字
				};
				GETuserinfo().then((res) => {
					const that = this;
					if (res.status === 1) {
						const result = res.data;
						// console.log(result);
						this.user.name = result.userName;
						that.user.levelName = result.levelname;
						that.user.partnerName = result.partner_name;
						that.numbertips = result.dai_payment;
						that.user.userId = result.userId;
						that.user.levelName = result.levelname;
						that.user.buyOrder = result.total_buyorder;
						that.user.sellOrder = result.total_sellorder;
						that.user.advertisingNumber = result.reputation_value;
						that.user.balance = result.drawMoney;
					} else {
						Fn.Toast(res.msg, 3, 1500);
					};
				});
			},

			/* 获取商品列表 */
			getGoodsList() {
				const that = this;
				GiftBag_goodsList().then((res) => {
					if (res.status === 1) {
						const result = res.data;
						// console.log(result)
						that.itemList = result.map(item => {
							return {
								id: item.id,
								number: item.goodsNum,
								title: item.goodsName,
								imgUrl: item.goodsLogo,
								price: Fn.checkDigit({
									number: item.goodsPrice,
									len: 2,
									max: 100000000,
									min: -1
								}) /* item.goodsPrice */ ,
								status: item.onlineStatus,
								status_two: item.status,
								integral: Fn.checkDigit({
									number: item.special_give,
									len: 2,
									max: 100000000,
									min: -1
								}), // 抢购分
								code: Fn.checkDigit({
									number: item.currency_give,
									len: 2,
									max: 100000000,
									min: -1
								}) // 消费积分
							};
						});
						// console.log(that.itemList);
						that.itemList = that.itemList.slice(0, 2);
						if (that.itemList.length === 0) {
							that.hasNoData = true;
						} else {
							that.hasNoData = false;
						};
					} else {
						Fn.Toast(res.msg, 3, 1500);
					};
				});
				agent_goodsList().then((res) => {
					if (res.status === 1) {
						const result = res.data;
						let itemList = [];
						itemList = result.map(item => {
							return {
								id: item.id,
								number: item.goodsNum,
								title: item.goodsName,
								imgUrl: '/static/images/home/huaban.png' /* item.goodsLogo */ ,
								price: Fn.checkDigit({
									number: item.goodsPrice,
									len: 2,
									max: 100000000,
									min: -1
								}) /* item.goodsPrice */ ,
								status: item.onlineStatus,
								status_two: item.status,
								integral: Fn.checkDigit({
									number: item.special_give,
									len: 2,
									max: 100000000,
									min: -1
								}), // 抢购分
								code: Fn.checkDigit({
									number: item.currency_give,
									len: 2,
									max: 100000000,
									min: -1
								}) // 消费积分
							};
						});
						that.arrivalGoodsList = itemList.slice(0, 3);
						console.log(that.arrivalGoodsList)
						// if (itemList.length === 0) {
						// 	that.hasNoData = true;
						// } else {
						// 	that.hasNoData = false;
						// };
					} else {
						Fn.Toast(res.msg, 3, 1500);
					};
				});
			},

			/* 向下滚动 */
			lower() {
				// console.log(e);
				const that = this;
				if (that.pages <= that.total_page && that.recommendGoodsList.length != that.total_amount) {
					that.loading.status = 'loading';
					setTimeout(() => {
						that.pages = that.pages + 1;
						// that.getMoreDetail();
						// console.log(1)
					}, 700);
				} else {
					that.loading.status = 'nomore';
				};
			},

			/* 1. uniapp弹窗弹出获取授权（地理，个人微信信息等授权信息）弹窗 */
			// getAuthorizeInfo(a = "scope.userLocation") {
			// 	var _this = this;
			// 	uni.authorize({
			// 		scope: a,
			// 		success: (res) => { //1.1 允许授权
			// 			_this.getLocationInfo();
			// 			uni.showToast({
			// 				title: '获取定位信息成功',
			// 				icon: 'none'
			// 			});
			// 		},
			// 		fail: (res) => { //1.2 拒绝授权
			// 			uni.showToast({
			// 				title: '您取消了授权，无法获取约赛信息',
			// 				icon: 'none'
			// 			})
			// 			console.log("你拒绝了授权，无法获得周边信息")
			// 			this.isgetlocal = true;
			// 		}
			// 	})
			// },
			/* 2. 获取地理位置 */
			// getLocationInfo() {
			// 	var _this = this;
			// 	uni.getLocation({
			// 		type: 'wgs84',
			// 		altitude: true,
			// 		geocode: true,
			// 		isHighAccuracy: true,
			// 		//本来以为是获取不到以为getLocation失效了，后来才发现原来是慢。所以一定要配置这个。
			// 		highAccuracyExpireTime: 100, // 需要设置highAccuracyExpireTime，在规定时间内返回当前最高精度的经纬度
			// 		success: (res) => {
			// 			let latitude, longitude;
			// 			latitude = res.latitude.toString();
			// 			longitude = res.longitude.toString();
			// 			const params = {
			// 				key: 'BP7BZ-H6JKS-EGKOF-64ABD-BVYSF-JEFNE',
			// 				output: 'jsonp'
			// 			};
			// 			const api = 'http://apis.map.qq.com/ws/geocoder/v1/?location=' + latitude +
			// 				',' + longitude; 
			// 			Fn.jsonp(api, params).then((res) => {
			// 				const result = res.result;
			// 				console.log(result);
			// 			});
			// 			// uni.request({
			// 			// 	header: {
			// 			// 		"Content-Type": "application/text"
			// 			// 	},
			// 			// 	url: 'http://apis.map.qq.com/ws/geocoder/v1/?location=' + latitude + ',' +
			// 			// 		longitude + '&key=BP7BZ-H6JKS-EGKOF-64ABD-BVYSF-JEFNE',
			// 			// 	success: (re) => {
			// 			// 		//console.log("中文位置")
			// 			// 		//console.log(re)
			// 			// 		console.log(re.data.result.address_component.province);
			// 			// 		console.log(re.data.result.address_component.city);
			// 			// 		this.province = re.data.result.address_component.province;
			// 			// 		this.city = re.data.result.address_component.city;
			// 			// 		this.location = this.province + this.city;
			// 			// 		//console.log(this.location)
			// 			// 		// 获取地理位置
			// 			// 		if (this.u_id == '') {
			// 			// 			_this.getContest();
			// 			// 		} else {
			// 			// 			_this.addLocation();
			// 			// 			// 获取约赛信息
			// 			// 			_this.getContest();
			// 			// 			if (re.statusCode === 200) {
			// 			// 				//console.log("获取中文街道地理位置成功")
			// 			// 			} else {
			// 			// 				console.log("获取信息失败，请重试！")
			// 			// 			}
			// 			// 		}
			// 			// 	},
			// 			// 	fail: (re) => {
			// 			// 		console.log(re)
			// 			// 	}
			// 			// });
			// 		}
			// 	});
			// },
			/* 3. 检查当前是否已经授权访问scope属性 */
			// isGetLocation(a = "scope.userLocation") {
			// 	var _this = this;
			// 	uni.getSetting({
			// 		success: (res) => {
			// 			if (!res.authSetting[a]) { //3.1 每次进入程序判断当前是否获得授权，如果没有就去获得授权，如果获得授权，就直接获取当前地理位置
			// 				_this.getAuthorizeInfo()
			// 			} else {
			// 				_this.getLocationInfo()
			// 			}
			// 		}
			// 	});
			// },

			// 获取线上APP版本信息
			// getAppInfo(type) {
			// 	const system_info = uni.getSystemInfoSync();
			// 	let params = {
			// 		os: system_info.platform //本机设备操作系统  （android || ios）
			// 	};
			// 	if (params.os != 'ios' && params.os != 'android') false; //如果不是安卓或ios 返回false
			// 	//这里自行请求API获取版本信息 建议传入操作系统标识，返回本机对应的操作系统最新版本信息，也就是安卓的返回就是安卓的版本信息  ios返回就是ios的版本信息
			// 	//请求获取最新版本
			// 	setTimeout(() => {
			// 		let update_info = {
			// 			version: '1.0.2', //线上版本
			// 			now_url: "https://dldir1.qq.com/weixin/android/weixin802android1860_arm64.apk", //更新链接
			// 			silent: 0, //是否是静默更新
			// 			force: 1, //是否是强制更新
			// 			net_check: 1, //非WIfi是否提示
			// 			note: "产品汪汪要改这个字的颜色", //更新内容
			// 		}
			// 		checkUpdate(update_info, type).then(res => {
			// 			if (res.msg) {
			// 				plus.nativeUI.toast(res.msg);
			// 			}
			// 		}); ///检查更新
			// 		//checkUpdate 这个方法会做什么？：线上版本号 与 本地版本号做对比 ，如果需要更新  根据静默，强制、wifi等信息执行静默更新或跳转到升级页面
			// 		//跳转升级页面的前提是，需要新建并在pages.json中配置升级页面，配置方法请查看插件详情
			// 	}, 200);
			// },

			/* 获取轮播图内容 */
			getBanner() {
				const that = this;
				banner().then((res) => {
					if (res.status === 1) {
						const result = res.data;
						for (let i = 0; i < result.length; i++) {
							that.list.push(result[i].url);
						};
					} else {
						Fn.Toast(res.msg, 3, 1500);
					};
				});
			},

			/* 今日上新滚动列表 */
			upper(e) {
				// console.log(e)
			},
			lower(e) {
				// console.log(e)
			},
			scroll(e) {
				// console.log(e)
				this.old.scrollLeft = e.detail.scrollTop
			},

			/* 获取商品列表 */
			// getGoodsList() {
			// 	const that = this;
			// 	goodsSpecial().then((res) => {
			// 		if (res.status === 1) {
			// 			const result = res.data;
			// 			that.itemList = result.map(item => {
			// 				return {
			// 					id: item.id,
			// 					number: item.goodsNum,
			// 					title: item.goodsName,
			// 					img: item.goodsLogo,
			// 					price: item.goodsPrice,
			// 					status: item.onlineStatus
			// 				};
			// 			});
			// 		} else {
			// 			Fn.Toast(res.msg, 3, 1500);
			// 		};
			// 	});
			// },

			/* 商品下单 */
			// addOrder(id) {
			// 	const that = this;
			// 	const params = {
			// 		id: id
			// 	};
			// 	createOrder(params).then((res) => {
			// 		if (res.status === 1) {
			// 			that.showTips = true;
			// 			that.maskTips = '商品下单成功'
			// 		} else {
			// 			Fn.Toast(res.msg, 3, 1500);
			// 		};
			// 	});
			// },

			/* 确认 */
			// confirm() {
			// 	this.showTips = false;
			// 	uni.navigateTo({
			// 		url: '/pages/mine/buyOrder/buyOrder?id=' + 1,
			// 	});
			// },

			/* 取消 */
			// cancel() {
			// 	this.showTips = false;
			// },

			/* 跳转商城页面 */
			navigateTo(index) {
				const that = this;
				if (index === 0) {
					uni.navigateTo({
						url: '/pages/newAuction/newAuction'
					})
					return;
				} else if (index === 1) {
					uni.navigateTo({
						url: '/pages/auction/auction'
					})
					return;
				}
			},

			/* 跳转至商城页面 */
			navigateToMall(index) {
				if (index === 0) {
					uni.navigateTo({
						url: '/pages/index/finalMall/finalMall',
					});
					// Fn.Toast('暂未开放', 3, 1000)
				} else if (index === 1) {
					// Fn.Toast('暂未开放', 3, 1000)
					uni.switchTab({
						url: '/pages/index/mall/mall'
					})
					return;
				} else if (index === 2) {
					Fn.Toast('暂未开放', 3, 1000)
				} else if (index === 3) {
					Fn.Toast('暂未开放', 3, 1000)
				} else if (index === 4) {
					// Fn.Toast('暂未开放', 3, 1000)
					uni.switchTab({
						url: '/pages/notice/notice'
					})
					return;
				}
			},

			/* 跳转至邀请海报页面 */
			navigatePoster() {
				uni.navigateTo({
					url: '/pages/index/invite/invite',
				});
			},

			/* 跳转至竞购速拍页面 */
			navigateAuction() {
				uni.switchTab({
					url: '/pages/auction/auction',
				});
			},

			/* 跳转至商城页面 */
			navigateMall() {
				uni.switchTab({
					url: '/pages/index/mall/mall'
				})
			},

			/* 跳转至积分商城页面 */
			navigateCredit() {
				uni.navigateTo({
					url: '/pages/index/creditMall/creditMall',
				});
			},

			/* 跳转至爆品区商城页面 */
			navigateFinal() {
				uni.navigateTo({
					url: '/pages/index/finalMall/finalMall',
				});
			},

			/* 跳转至积分商城页面 */
			navigateIntegralMall() {
				uni.navigateTo({
					url: '/pages/index/integralMall/integralMall',
				});
			},
		}
	}
</script>

<style lang="scss">
	@import "@/static/css/home.scss";

	page {
		// background-color: #F4F4F4;
	}

	// .mask {
	// 	position: fixed;
	// 	z-index: 1001;
	// 	top: 0;
	// 	right: 0;
	// 	bottom: 0;
	// 	left: 0;
	// 	background-color: rgba(0, 0, 0, 0.5);

	// 	.modal-bg-box {
	// 		background-color: #FFFFFF;
	// 		width: 580rpx;
	// 		// height: 390rpx;
	// 		position: absolute;
	// 		left: 50%;
	// 		top: 45%;
	// 		transform: translate(-50%, -50%);

	// 		.title {
	// 			text-align: center;
	// 			margin: 40rpx 0;
	// 			font-size: 42rpx;
	// 			font-weight: 600;
	// 		}

	// 		.inner-box {
	// 			margin: 20rpx 55rpx 40rpx 55rpx;
	// 			text-align: center;

	// 			.text-tips {
	// 				display: block;
	// 				line-height: 70rpx;
	// 				font-size: 33rpx;
	// 				font-family: Alibaba PuHuiTi;
	// 				font-weight: bold;
	// 				color: #89898C;
	// 				word-wrap: break-word;
	// 			}

	// 			.button-box {
	// 				text-align: center;
	// 				margin-top: 50rpx;
	// 				display: flex;
	// 				align-items: center;
	// 				justify-content: center;

	// 				.button-one {
	// 					display: inline-block;
	// 					padding: 0 10px;
	// 					width: 120rpx;
	// 					height: 58rpx;
	// 					line-height: 58rpx;
	// 					margin: 0 40rpx 0 0;
	// 					text-align: center;
	// 					color: #000000;
	// 					border: 2px solid #000000;
	// 					border-radius: 8rpx;
	// 					font-size: 26rpx;
	// 					font-weight: bold;
	// 					cursor: pointer;
	// 				}

	// 				.button-two {
	// 					padding: 0 10px;
	// 					background-color: #000000;
	// 					display: inline-block;
	// 					width: 120rpx;
	// 					height: 58rpx;
	// 					line-height: 58rpx;
	// 					// margin: 0 0 0 40rpx;
	// 					text-align: center;
	// 					color: #FFFFFF;
	// 					border-radius: 8rpx;
	// 					font-size: 26rpx;
	// 					font-weight: bold;
	// 					cursor: pointer;
	// 				}
	// 			}
	// 		}
	// 	}
	// }
</style>
